package router

import (
	"api-gateway/handler/service"
	"api-gateway/middleware"
	"github.com/gin-gonic/gin"
)

func Router() *gin.Engine {
	r := gin.Default()
	api := r.Group("/user").Use(middleware.AuthToken())
	{
		api.POST("/getUserInfoById", service.GetUserInfoById)
	}
	r.POST("/register", service.Register)
	r.POST("/login", service.Login)
	r.POST("/sms", service.Sms)
	return r
}
